<?php

namespace App\Models\Traits\Methods;

use Carbon\Carbon;

trait UserMethod
{
    /**
     * 判断用户是否已被封禁。
     * @return bool
     */
    public function isBlock()
    {
        return $this->is_block == 1 || ($this->block_expired != null && $this->block_expired > Carbon::now());
    }
}